//
//  GoodInfoModel.m
//  Wmj_ShoppingCart
//
//  Created by wumengjuan on 16/10/21.
//  Copyright © 2016年 wumengjuan. All rights reserved.
//

#import "GoodInfoModel.h"

@interface GoodInfoModel ()

@end

@implementation GoodInfoModel

-(instancetype)initWithDict:(NSDictionary *)dict{

    if (self = [super init]) {
        
//        [self setValuesForKeysWithDictionary:dict];
        
        
        self.imageName = dict[@"imageName"];
        
        self.goodsTitle = dict[@"goodsTitle"];
        
        self.goodsPrice = dict [@"goodsPrice"];
        
        self.goodsNum = [dict [@"goodsNum"] intValue];
        
        self.selectState = [dict [@"selectState"]boolValue];
    }
    return self;
}
//+(NSMutableArray *)goodsArray{
//
//    NSMutableArray * goodsArr =[[NSMutableArray alloc]init];
//
//    for (int i = 0; i < 7; i++) {
//        
//        NSMutableDictionary * infoDic =[[NSMutableDictionary alloc]init];
//        
//        [infoDic setValue:@"" forKey:@"imageName"];
//        
//        [infoDic setValue:@"2000" forKey:@"goodsPrice"];
//        
//        [infoDic setValue:@"这是商品标题" forKey:@"goodsTitle"];
//        
//        [infoDic setValue:[NSNumber numberWithBool:NO] forKey:@"selectState"];
//        
//        [infoDic setValue:[NSNumber numberWithInt:1] forKey:@"goodsNum"];
//        
//        GoodInfoModel * goodModel  =[[GoodInfoModel alloc]initWithDict:infoDic];
//        
//        [goodsArr addObject:goodModel];
//
//    }
//    
//    return  goodsArr;
//}
@end
